using UnityEngine;
using System.Collections;

public class solarSystemSelectGUI : MonoBehaviour {
	
	public GameObject lord;
	public Texture solarSelect;
	
	public GameObject storage;
	
	public GameObject soundClick;
	public GameObject menuSong;
	// Use this for initialization
	void Start () {
		Instantiate(menuSong,transform.position,transform.rotation);
		storage = GameObject.FindWithTag("storage");
	}
	void Update()
	{
		Time.timeScale= 3;
	}
	// Update is called once per frame
	void OnGUI () {
		GUI.backgroundColor = Color.magenta;
		GUI.DrawTexture(new Rect((Screen.width/2)-(solarSelect.width/2), Screen.height*.01f, 600,300), solarSelect, ScaleMode.ScaleToFit, true, 0);

		if (GUI.Button(new Rect(Screen.width/2, Screen.height*.5f, 110, 40), "Game System"))
		{
			Instantiate(lord,transform.position,transform.rotation);
			Instantiate(soundClick,transform.position,transform.rotation);
			Application.LoadLevel("solarSystemOne");
		}
		if (GUI.Button(new Rect(Screen.width*.2f, Screen.height*.85f, 100, 40), "MainMenu"))
		{
			Instantiate(soundClick,transform.position,transform.rotation);
			storage.GetComponent<storage>().kill();
			Application.LoadLevel("mainMenu");
		}
		if (GUI.Button(new Rect(Screen.width*.8f, Screen.height*.85f, 100, 40), "Quit"))
		{
			Instantiate(soundClick,transform.position,transform.rotation);
			Application.Quit();
		}
	}
}
